package com.yueyang.sojourn.server.common.baymax.web.result.exception;

import org.springframework.http.HttpStatus;

/**
 * 未授权,此类异常将被转换为Http 401
 * 
 * @author huisman
 */
public class UnauthorizedException extends AbstractResultException {
  private static final long serialVersionUID = 1L;

  /**
   * @since 1.0.0
   * @param code 业务错误码
   * @param message 业务提示信息
   */
  public UnauthorizedException(int code, String message) {
    super(code, message, HttpStatus.UNAUTHORIZED);
  }


  /**
   * 业务错误码为 {@link ResultCode#UNKNOWN}
   * 
   * @since 1.0.0
   * @param message 业务提示信息
   */
  public UnauthorizedException(String message) {
    super(message, HttpStatus.UNAUTHORIZED);
  }


}
